<%--
  Created by IntelliJ IDEA.
  User: ZheL2
  Date: 2023/12/13
  Time: 15:10
  To change this template use File | Settings | File Templates.
--%>
<%--
  Created by IntelliJ IDEA.
  User: ZheL2
  Date: 2023/12/13
  Time: 15:10
  To change this template use File | Settings | File Templates.
--%>
<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="m" uri="/WEB-INF/tld/mytag.tld"%>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt" %>

<html>
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
    <title>${club}</title>
    <!-- Bootstrap CSS -->
    <link rel="stylesheet" type="text/css" href="<c:url value='/resources/css/bootstrap.css'/>">
    <link rel="stylesheet" type="text/css" href="<c:url value='/resources/css/style.css' />">
    <script src="<c:url value='/resources/js/bootstrap.bundle.js'/> "></script>
</head>
<body>

    <div class="page-container">
    <header>
        <jsp:include page="userHeader.jsp"/>

    </header>

    <div class="content">
        <div class="container my-5">
            <h2 class="mb-4 fw-bold">${club.clubName}</h2><hr>
            <p class="mb-3"><strong>社团简介：</strong>${club.description}</p>
            <p class=""><strong>所属学院：</strong>${club.college}</p>
            <p class="mb-3"><strong>成立时间：</strong><fmt:formatDate value="${club.createTime}" pattern="yyyy-MM-dd HH:mm"/></p>

            <!-- 展示社团负责人列表 -->
            <br><br>
            <h3 class="mb-3 fw-bold">社团负责人列表</h3><hr>
            <ul class="list-group mb-4">
                <c:if test="${not empty club.adminList}">
                    <c:forEach items="${club.adminList}" var="admin">
                        <li class="list-group-item">${admin.nickname}</li>
                    </c:forEach>
                </c:if>
                <c:if test="${empty club.adminList}">
                    <p>该社团还没有负责人</p>
                </c:if>
            </ul>

            <!-- 展示社团成员列表 -->
            <br>
            <h3 class="mb-3 fw-bold">社团成员列表</h3><hr>
            <ul class="list-group mb-4">
                <c:if test="${not empty club.memberList}">
                    <c:forEach items="${club.memberList}" var="member">
                        <li class="list-group-item">${member.nickname}</li>
                    </c:forEach>
                </c:if>
                <c:if test="${empty club.memberList}">
                    <p>该社团还没有成员</p>
                </c:if>
            </ul>

            <!-- 展示社团活动列表 -->
            <br>
            <h3 class="mb-3 fw-bold">社团活动列表</h3><hr>
            <ul class="list-group mb-4">
                <c:if test="${not empty club.activityList}">
                    <c:forEach items="${club.activityList}" var="activity">
                        <li class="list-group-item">${activity.activityName}</li>
                    </c:forEach>
                </c:if>
                <c:if test="${empty club.activityList}">
                    <p>该社团还没有活动</p>
                </c:if>
            </ul>

        </div>
    </div>

    <footer>
        <m:footer/>
    </footer>
</div>

</body>
</html>
